package com.singleton.demo06;

import com.singleton.demo05.KeyGenerator;

/**
 * 带有数据库缓存的序列键生成器
 */
public class Client {
    public static void main(String[] args) {
        for (int i = 0; i < 5005; i++) {
            new Thread(()->{
                com.singleton.demo05.KeyGenerator instance = KeyGenerator.getInstance();
                System.out.println(Thread.currentThread().getName()
                        + instance.getKey());
            },i+"线程------->").start();
        }
    }
}
